package com.zp.base.dubbo;

import com.zp.base.api.RemoteClinicItemDictService;
import com.zp.base.api.bo.ClinicItemDictBo;
import com.zp.base.api.vo.ClinicItemDictVo;
import com.zp.base.api.vo.PriceListVo;
import com.zp.base.service.clinicItemDict.IClinicItemDictService;
import lombok.RequiredArgsConstructor;
import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.stereotype.Service;

import java.util.List;

@RequiredArgsConstructor
@Service
@DubboService
public class RemoteClinicItemDictServiceImpl implements RemoteClinicItemDictService {

    private final IClinicItemDictService clinicItemDictService;

    @Override
    public List<PriceListVo> getPriceList (String orgId, List<String> itemClassArray, List<String> clinicItemIdArray) {
        List<PriceListVo> getPriceList = clinicItemDictService.getPriceList(orgId, itemClassArray, clinicItemIdArray);
        return getPriceList;
    }

    /**
     * 通过clinicItemId获取诊疗项目
     *
     * @param clinicalItemId
     * @return
     */
    @Override
    public List<ClinicItemDictVo> getClinicItemDictList (String clinicalItemId) {
        ClinicItemDictBo clinicItemDictBo = new ClinicItemDictBo();
        clinicItemDictBo.setClinicItemId(clinicalItemId);
        return clinicItemDictService.queryList(clinicItemDictBo);
    }

    @Override
    public List<ClinicItemDictVo> getClinicItemsAndPriceList (String orgId, List<String> itemClassArray, List<String> clinicItemIdArray) {
        return clinicItemDictService.getClinicItemsAndPriceList(orgId, itemClassArray, clinicItemIdArray);
    }

    @Override
    public List<ClinicItemDictVo> queryList (ClinicItemDictBo bo) {
        return clinicItemDictService.queryList(bo);
    }

}
